{{- if or (not .Values.dashboard.auth.externalAuthentication ) (eq (include "helm_lib_module_https_mode" .) "Disabled") }}
---
apiVersion: v1
kind: Secret
metadata:
  name: basic-auth
  namespace: d8-{{ .Chart.Name }}
  {{- include "helm_lib_module_labels" (list . (dict "app" "dashboard")) | nindent 2 }}
type: Opaque
data:
  auth: {{ print "admin:{PLAIN}" .Values.dashboard.internal.auth.password | b64enc | quote }}
{{- end }}
---
apiVersion: v1
kind: Secret
metadata:
  name: kubernetes-dashboard-csrf
  namespace: d8-{{ .Chart.Name }}
  {{- include "helm_lib_module_labels" (list . (dict "app" "dashboard")) | nindent 2 }}
type: Opaque
data:
  csrf: ""
---
apiVersion: v1
kind: Secret
metadata:
  name: kubernetes-dashboard-key-holder
  namespace: d8-{{ .Chart.Name }}
  {{- include "helm_lib_module_labels" (list . (dict "app" "dashboard")) | nindent 2 }}
type: Opaque
data:
  priv: ""
  pub: ""
